<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="pg"  uri="http://jsptags.com/tags/navigation/pager" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    
<base href="<%=basePath%>"> 
<title>客户管理系统</title>
<style>
body,ul,ol,dl,dd,p,h1,h2,h3,h4,h5,h6,form,input,textarea,select,td,th{margin:0;padding:0; font-family:"宋体",Arial, Helvetica, sans-serif;}
li{ list-style:none;}
input{ background:none;}
.clear{ zoom:1;}
.clear:after{content:""; display:block; clear:both;}
</style>
<link href="<%= request.getContextPath() %>/html/css/Main.css" rel="stylesheet" />
<script type="text/javascript" src="<%= request.getContextPath() %>/html/js/PopupCalendar.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/html/js/prototype.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/html/js/buffalo.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/html/js/pims.js"></script>
<script src="<%=request.getContextPath()%>/html/js/Calendar.js" charset="utf-8"></script>
<script type="text/javascript">
	  
    
    function check(){
	    var v1=document.getElementById("startDate").value;
	    var v2=document.getElementById("endDate").value;
    	if(v1!=""&&v2!=""&&v1>v2){
    		alert("开始日期在结束日期之后");
    		return false;
    	}
    	return true;
    }
    
  </script>
</head>
<body>
<div class="container">
    <div class="wrap clear">
        <div class="sub_wp_right">
        	<div class="rt_tt">
            	<h3 class="tittle">管理员管理</h3>
            </div>
             <div class="ct">
                	<h3 class="sm_tt">查询条件</h3>
                	<form action="<%= request.getContextPath() %>/user/list.do" name="listForm" method="post" onsubmit="return check()">
                	<input type="hidden" name="organOid" value="${organOid }"/>
                    <div class="tiaojian">
                        	<ul class="clear">
                            	<li>
                                	<span>用户名：</span>
                                    <input type="text" class="txt" name="user.user_Name" value="${ user.user_Name}"/>
                                </li>
                                <li>
                                	<span>姓名：</span>
                                    <input type="text" class="txt" name="user.real_Name" value="${user.real_Name}"/>
                                </li>
                                <li>
                                	<span>手机号码：</span>
                                    <input type="text" class="txt" name="user.mobile" value="${user.mobile}"/>
                                </li>
                                <li>
                                	<span>电子邮件：</span>
                                    <input type="text" class="txt" name="user.mail" value="${user.mail}"/>
                                </li>
                                <li>
                                	<span>类型：</span>
                                    <select name="roletype">
                                    	<option value="" <c:if test="${roletype eq ''}">selected</c:if> >不限</option>
                                        <option value="ADMIN" <c:if test="${ roletype eq 'ADMIN'}">selected</c:if>>一级管理员</option>
                                        <option value="SUBADMIN" <c:if test="${roletype eq 'SUBADMIN'}">selected</c:if>>二级管理员</option>
                                         <option value="THIRDADMIN" <c:if test="${roletype eq 'THIRDADMIN'}">selected</c:if>>三级管理员</option>
                                    </select>
                                </li>
                                <li>
                                	<span>状态：</span>
                                    <select name="activietype">
                                    	<option value="" <c:if test="${ activietype eq ''}">selected</c:if>>不限</option>
                                        <option value="activie" <c:if test="${activietype eq 'activie'}">selected</c:if>>启用</option>
                                        <option value="noactivie" <c:if test="${activietype eq 'noactivie'}">selected</c:if>>禁用</option>
                                    </select>
                                </li>
                            </ul>
                            <div class="btn"><input type="submit" value="查询" class="cxbtn" /></div>
                    </div>
                    <s:property value="@com.ulic.customerManApplication.pager.PagerTag@getStart('管理员列表', #request.pm)" escape="false"/>
                    <div class="jieguo">
						<table border="0" cellpadding="0" cellspacing="0" width="100%">
							<thead>
							<tr>
								<th align="center">用户名</th>
								<th align="center">姓名</th>
								<th align="center">办公电话</th>
								<th align="center">手机号码</th>
								<th align="center">电子邮件</th>
								<th align="center">所属机构</th>
								<th align="center">操作</th>
							</tr>
							</thead>
							<tbody>
							<s:if test="#request.pm.datas.size()==0">
								<tr>
									<td colspan="14" align="center"><font color="red">暂无数据！</font></td>
								</tr>
							</s:if>
						    <s:else>
								<s:iterator value="#request.pm.datas" var="bean" status="status">
									<s:if test="#status.odd == true">
										<tr	class="rowNormal" onmouseover="this.className='rowChecked'" onmouseout="this.className='rowNormal'">
									</s:if>
									<s:else>
										<tr	class="rowAlternate" onmouseover="this.className='rowChecked'" onmouseout="this.className='rowAlternate'">
									</s:else>
										<td align="center"><s:property value="#bean.user_Name"/></td>
										<td align="center">
											<s:if test="#bean.real_Name == null || #bean.real_Name.length() == 0">&nbsp;</s:if>
											<s:property value="#bean.real_Name"/>
										</td>
										<td align="center">
											<s:if test="#bean.telephone == null || #bean.telephone.length() == 0">&nbsp;</s:if>
											<s:property value="#bean.telephone"/>
										</td>
										<td align="center">
											<s:if test="#bean.mobile == null || #bean.mobile.length() == 0">&nbsp;</s:if>
											<s:property value="#bean.mobile"/>
										</td>
										<td align="center">
											<s:if test="#bean.mail == null || #bean.mail.length() == 0">&nbsp;</s:if>
											<s:property value="#bean.mail"/>
										</td>
										<td align="center">
											<s:if test="#bean.organization == null || #bean.organization.full_name.length() == 0">&nbsp;</s:if>
											<s:property value="#bean.organization.full_name"/>
										</td>
										<td align="center">
											<a href="<%=request.getContextPath()%>/user/viewUser.do?userid=<s:property value="#bean.um_user_id"/>">查看</a>
											<a href="<%=request.getContextPath()%>/user/setPermission.do?userid=<s:property value="#bean.um_user_id"/>&organOid=${organOid }">设置权限</a>
										</td>
									</tr>
								</s:iterator>
							</s:else>
							<tr>
							</tr>
							</tbody>
						</table>
                    </div>
                    <s:property value="@com.ulic.customerManApplication.pager.PagerTag@getEnd(#request.pm)" escape="false"/>
            	</form>
             </div>
        </div>
       
    </div>
</div>
</body>
</html>